begin = ln -s /demo/node_modules /x9x/node_modules
cmd-run = docker run --rm -it -p4000:4000 -v $(PWD):/x9x -w /x9x helphi/gitbook:3.2.3-demo-8 make run-in-docker
cmd-build = docker run --rm -it -v $(PWD):/x9x -w /x9x helphi/gitbook:3.2.3-demo-8 make build-in-docker

.PHONY: run
run:
	$(cmd-run)

.PHONY: build
build:
	$(cmd-build)

.PHONY: run-in-docker
run-in-docker:
	$(begin) 
	gitbook serve

.PHONY: build-in-docker
build-in-docker:
	$(begin) 
	gitbook build